SSO

interface SSO

Single-Sign On (SSO) refers to the ability for a user to use a single identity to authenticate and gain access to multiple apps and service. In the case of B2B, it generally refers for the ability to use a workplace identity managed by their company. Read our blog post for more information about SSO.

Stytch supports the following SSO protocols:

  • SAML

Types

Link copied to clipboard
data class AuthenticateParams(val ssoToken: String, val sessionDurationMinutes: UInt = Constants.DEFAULT_SESSION_TIME_MINUTES)

Data class used for wrapping parameters used in SSO Authenticate calls

Link copied to clipboard
data class StartParams(    val context: Activity,     val ssoAuthRequestIdentifier: Int,     val connectionId: String,     val loginRedirectUrl: String? = null,     val signupRedirectUrl: String? = null)

Data class used for wrapping parameters used in SSO start calls

Functions

Link copied to clipboard
abstract suspend fun authenticate(params: SSO.AuthenticateParams): SSOAuthenticateResponse
abstract fun authenticate(params: SSO.AuthenticateParams, callback: (SSOAuthenticateResponse) -> Unit)

Authenticate a user given a token. This endpoint verifies that the user completed the SSO Authentication flow by verifying that the token is valid and hasn't expired.

Link copied to clipboard
abstract fun start(params: SSO.StartParams)

Start an SSO authentication flow